Skip to main content

PI

Returns the mathematical constant pi, equal to 3.14159265358979, accurate to 15 digits.

Syntax

expression.PI();

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

This method doesn't have any parameters.

Returns

number

Example

var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.PI());